package com.qiaofang.applet.service.property.repository;

import com.qiaofang.applet.service.property.domain.Area;
import com.qiaofang.applet.service.property.domain.District;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AreaRepository extends MongoRepository<Area, String> {
    Area findByAreaUuidAndCompanyUuid(String areaUuid, String companyUuid);

    List<Area> findAllByDistrictUuidAndCorporationCode(String cityCode, String corporationCode);

    List<Area> findAllByCorporationCodeAndCityCode(String corporationCode,String cityCode);

    List<Area> findAllByCorporationCode(String corporationCode);
}
